home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / applic / ntp / acts.zoo / unpbcd.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-10-14  |  498 b   |  18 lines

  1. int unpbcd(ival)
  2. int ival;
  3. {
  4. #include "nbstime.h"
  5. #ifdef IBMPC
  6. /*
  7.         this routine receives a packed BCD value in ival (as read
  8.         from the CMOS clock) and returns the integer value.
  9.         it is the inverse function to cnvbcd, which produces a packed
  10.         BCD value from an integer input
  11.  
  12.     note that this function is not used in the SUN version and
  13.     will be compiled as a do-nothing if IBMPC is not defined
  14. */
  15.         return(10*(ival >> 4) + (ival & 0xf) );
  16. #endif
  17. }
  18.